//
//  ProductDetailCouponCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/21.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "ProductDetailCouponCell.h"

@implementation ProductDetailCouponCell

- (void)awakeFromNib {
    [super awakeFromNib];

}


- (void)setDataArray:(NSMutableArray<CommonCouponModel *> *)dataArray {
    
    
    self.couponTag1.hidden = YES;
    self.couponTag2.hidden = YES;
    self.couponTag3.hidden = YES;
    for (int i = 0; i < dataArray.count; i++) {
        CommonCouponModel *model = dataArray[i];
        switch (i) {
            case 0:{
                self.couponTag1.hidden = NO;
                self.couponTag1.text = [NSString stringWithFormat:@"  %@减%@  ",[Utilities changeDoubleToString:model.scoFull] ,[Utilities changeDoubleToString:model.scoCut]];
                
                    self.couponTag1.layer.cornerRadius = 3.0f;
//                self.couponTag1.layer.backgroundColor = UIColorHex(0x000000).CGColor;
                self.couponTag1.backgroundColor = UIColorHex(0xededed);

            } break;
            case 1:{
                self.couponTag2.hidden = NO;
                self.couponTag2.text = [NSString stringWithFormat:@"  %@减%@  ",[Utilities changeDoubleToString:model.scoFull] ,[Utilities changeDoubleToString:model.scoCut]];
                //    self.couponTag2.layer.cornerRadius = 3.0f;
//                self.couponTag2.layer.backgroundColor = UIColorHex(0xededed).CGColor;
                self.couponTag2.backgroundColor = UIColorHex(0xededed);

            } break;
            case 2:{
                self.couponTag3.hidden = NO;
                self.couponTag3.text = [NSString stringWithFormat:@"  %@减%@  ",[Utilities changeDoubleToString:model.scoFull] ,[Utilities changeDoubleToString:model.scoCut]];
                //    self.couponTag3.layer.cornerRadius = 3.0f;
//                self.couponTag3.layer.backgroundColor = UIColorHex(0xededed).CGColor;
                self.couponTag3.backgroundColor = UIColorHex(0xededed);

            } break;
            default:
                break;
        }
    }
    
}

@end
